/****************************Risk cash flow chart and Grid*************/

 $(document).ready(function () {
            
            // prepare the data
            var source =
            {
                dataType: "json",
                dataFields: [
					{ name: 'date', type: 'string' },
					{ name: 'amount', type: 'string' },
					{ name: 'flowType', type: 'string' },
					{ name: 'notional', type: 'string' },
					{ name: 'tradeId', type: 'string' },
					{ name: 'version', type: 'string' },
					{ name: 'bookId', type: 'string' },
					{ name: 'folderId', type: 'string' },
					{ name: 'partyId', type: 'string' },
					{ name: 'traderId', type: 'string' },
					{ name: 'productType', type: 'string' },
					{ name: 'description', type: 'string' },
					{ name: 'status', type: 'string' },
					{ name: 'currency', type: 'string' },
					{ name: 'underlierInfo', type: 'string' },
					{ name: 'maturityDate', type: 'string' },
					{ name: 'maturityDateYear', type: 'string' },
					{ name: 'changedCount', type: 'string' },
					{ name: 'book', type: 'string' },
					{ name: 'folder', type: 'string' },
					{ name: 'party', type: 'string' },
					{ name: 'entity', type: 'string' },
					{ name: 'trader', type: 'string' },
					{ name: 'flowDate', type: 'string' },
					{ name: 'feeType', type: 'string' },
					{ name: 'legId', type: 'string' },
					{ name: 'legType', type: 'string' },
					{ name: 'currentNotional', type: 'string' },
					{ name: 'nDays', type: 'string' },
					{ name: 'fxRate', type: 'string' },
					{ name: 'fxPv', type: 'string' },
					{ name: 'cumulativeAmount', type: 'string' },
					{ name: 'bActivity', type: 'string' },
					{ name: 'bAdminStrategy', type: 'string' },
					{ name: 'bCalendar', type: 'string' },
					{ name: 'bDesk', type: 'string' },
					{ name: 'bFund', type: 'string' },
					{ name: 'bGeography', type: 'string' },
					{ name: 'bLegalEntity', type: 'string' },
					{ name: 'bRecapGroup', type: 'string' },
					{ name: 'bSimulation', type: 'string' },
					{ name: 'bStrategy', type: 'string' },
					{ name: 'bStrategyName', type: 'string' },
					{ name: 'bStrategyType', type: 'string' },
					{ name: 'bSubActivity', type: 'string' }

                ], 
                url:  ezopsContextPath+'/getReports/getriskcashflowgrid'
            };
            var dataAdapter = new $.jqx.dataAdapter(source, {
                loadComplete: function () {
                    // data is loaded.
                }
            });
            var cellClass = function (row, dataField, cellText, rowData) {
                var cellValue = rowData[dataField];
                switch (dataField) {
                    case "diffQuantity":
                        if (cellValue >100 || cellValue < 0) {
                            return "minavg";                            
                        }
                        if (cellValue <= 100 ) {
                            return "max";
                        }                       
                        return "max";
                        
                    case "diffMarketValue":
                        if (cellValue >100 || cellValue < 0) {
                            return "minavg";                            
                        }
                        if (cellValue <= 100 ) {
                            return "max";
                        }                        
                        return "min";                    
                }
            };
            // create jqxDataTable.
            $("#riskCashFlowGrid").jqxGrid(
            {
                source: dataAdapter,
                altRows: true,
                width: '99%',
                height: '600',
                sortable: true,
                pageable:false,
                filterable: true,
                groupable: true,
                showstatusbar: true,
                statusbarheight: 50,
                showaggregates: true,
                columnsresize: true,
                columnsreorder: true,
                
                columns: [
					{text:'Date',dataField:'date',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Amount',dataField:'amount',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Flow Type',dataField:'flowType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Notional',dataField:'notional',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Trade Id',dataField:'tradeId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Version',dataField:'version',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Book Id',dataField:'bookId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Folder Id',dataField:'folderId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Party Id',dataField:'partyId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Trader Id',dataField:'traderId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Product Type',dataField:'productType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Description',dataField:'description',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Status',dataField:'status',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Currency',dataField:'currency',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Underlier Info',dataField:'underlierInfo',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Maturity Date',dataField:'maturityDate',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Maturity Date Year',dataField:'maturityDateYear',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Changed Count',dataField:'changedCount',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Book',dataField:'book',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Folder',dataField:'folder',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Party',dataField:'party',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Entity',dataField:'entity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Trader',dataField:'trader',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Flow Date',dataField:'flowDate',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Fee Type',dataField:'feeType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Leg Id',dataField:'legId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Leg Type',dataField:'legType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Current Notional',dataField:'currentNotional',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'NDays',dataField:'nDays',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Fx Rate',dataField:'fxRate',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Fx Pv',dataField:'fxPv',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'Cumulative Amount',dataField:'cumulativeAmount',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Activity',dataField:'bActivity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:AdminStrategy',dataField:'bAdminStrategy',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Calendar',dataField:'bCalendar',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Desk',dataField:'bDesk',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Fund',dataField:'bFund',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Geography',dataField:'bGeography',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:LegalEntity',dataField:'bLegalEntity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:RecapGroup',dataField:'bRecapGroup',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Simulation',dataField:'bSimulation',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:Strategy',dataField:'bStrategy',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:StrategyName',dataField:'bStrategyName',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:StrategyType',dataField:'bStrategyType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
					{text:'B:SubActivity',dataField:'bSubActivity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'}
                ]
                
            });  
            
            /* $(function() {
        		$('#riskCashFlowChart').highcharts(
        				{
        					chart : {
        						type : 'bar'
        					},
        					title : {
        						text : ''
        					},
        					xAxis : {
        						categories : [ 'Bonds', 'CDS', 'CFD', 'Eq Options',
        								'Futures', 'IRS' ]
        					},
        					credits : {
        						enabled : false
        					},
        					series : [ {
        						name : '',
        						data : [ -4352714, -4217036, -394011, -34554, -37195,
        								-193548 ]
        					} ]
        				});
        	}); */
        });

$(document).ready(function () {
    
	   // prepare the data
		//var positionByCurrChecked = 'true';
		var riskCashBarSeriesArr = new Array();
		var riskCashBarCategoriesArr = new Array();
		//var riskCashBarSeriesAmtArr = new Array();
		$.getJSON(
				ezopsContextPath
						+ '/getReports/getriskcashflowanalysischart',
				function(data) {
					riskCashBarCategoriesArr = data.valueDates;
					riskCashBarSeriesArr =data.cashBalanceCurrencyAmountModel;
					//console.log('@##'+ko.toJSON(riskCashBarCategoriesArr)+'	'+ko.toJSON(riskCashBarSeriesArr));
					getriskCashFlowBarData(riskCashBarCategoriesArr,riskCashBarSeriesArr);
				});
		
		function getriskCashFlowBarData(riskCashBarCategoriesArr,riskCashBarSeriesArr){
			$(function() {
				$('#riskcashflowchart')
				.highcharts(
						{
							chart : {
								type : 'bar'
							},
							title : {
								text : ''
							},
							subtitle : {
								text : ''
							},
							xAxis : {
								categories : ["06-Oct","14-Dec","23-Feb","31-Dec"]
							},
							yAxis : {
								min : 0,
								title : {
									text : ''
								}
							},
							tooltip : {
								headerFormat : '<span style="font-size:10px">{point.key}</span><table>',
								pointFormat : '<tr><td style="color:{series.color};padding:0">{series.name}: </td>'
									+ '<td style="padding:0"><b>{point.y:.1f}</b></td></tr>',
									footerFormat : '</table>',
									shared : true,
									useHTML : true
							},
							plotOptions : {
								column : {
									pointPadding : 0.2,
									borderWidth : 0
								}
							},
							series : [{"data":[1,2,3,3],"name":"GBP"}]
						});
			}());
		}
	});

/**
 * Risk Cash flow End
 */
/** Value at risk (VAR) -- Static report **/

$(document).ready(function () {
    
    // prepare the data
    var source =
    {
        dataType: "csv",
        dataFields: [
             { name: 'Fund', type: 'string' },
             { name: 'Strategy', type: 'string' },
             { name: 'secType', type: 'string' },
             { name: 'Counterparty', type: 'string' },
             { name: 'Curr', type: 'string' },
             { name: 'Sec_Type', type: 'string' },
             { name: 'Trade_Date', type: 'string' },
             { name: 'Confirmed', type: 'string' },
             { name: 'Quantity', type: 'string' },
             { name: 'Cost_Price', type: 'string' },
             { name: 'Cost', type: 'string' },
             { name: 'Price', type: 'string' },
             { name: 'MV', type: 'string' },
             { name: 'PL_Today', type: 'string' },
             { name: 'MTD_PL', type: 'string' },
             { name: 'YTD_PL', type: 'string' },
             { name: 'PL', type: 'string' },
             { name: 'VAR', type: 'string' }

        ], 
        url: 'assets/sampledata/VarReport.csv'
    };
    var dataAdapter = new $.jqx.dataAdapter(source, {
        loadComplete: function () {
            // data is loaded.
        }
    });
    var cellClass = function (row, dataField, cellText, rowData) {
        var cellValue = rowData[dataField];
        switch (dataField) {
            case "diffQuantity":
                if (cellValue >100 || cellValue < 0) {
                    return "minavg";                            
                }
                if (cellValue <= 100 ) {
                    return "max";
                }                       
                return "max";
                
            case "diffMarketValue":
                if (cellValue >100 || cellValue < 0) {
                    return "minavg";                            
                }
                if (cellValue <= 100 ) {
                    return "max";
                }                        
                return "min";                    
        }
    };
    // create jqxDataTable.
    $("#var").jqxGrid(
    {
        source: dataAdapter,
        altRows: true,
        width: '99%',
        height: '600',
        sortable: true,
        pageable:false,
        filterable: true,
        groupable: true,
        showstatusbar: true,
        statusbarheight: 50,
        showaggregates: true,
        columnsresize: true,
        columnsreorder: true,
        
        columns: [
          { text: 'Fund', cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center', dataField: 'Fund',/* pinned: true,*/  width: '10%', minWidth: 80 },
          { text: 'Strategy', cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center', dataField: 'Strategy', width: '10%' },
          { text: 'Investment ID', dataField: 'secType',columngroup: 'ProductDetails', cellsformat: 'c2', align: 'center', cellsAlign: 'center', width: '10%' },
          { text: 'Counterparty / Custodian',columngroup: 'ProductDetails', dataField: 'Counterparty', cellsformat: 'd', cellsAlign: 'center', align: 'center', width: '10%', minWidth: 180  },
          { text: 'Curr', cellsAlign: 'center', align: 'center', dataField: 'Curr', width: '10%'},
          { text: 'Sec Type', cellsAlign: 'center', align: 'center', dataField: 'Sec_Type', width: '10%'},
          { text: 'Trade Date', cellsAlign: 'center', align: 'center', dataField: 'Trade_Date', width: '10%'},
          { text: 'Confirmed: Y/N', cellsAlign: 'center', align: 'center', dataField: 'Confirmed', width: '10%'},
          { text: 'Quantity', cellsAlign: 'center', align: 'center', dataField: 'Quantity', width: '10%'},
          { text: 'Cost Price', cellsAlign: 'center', align: 'center', dataField: 'Cost_Price', width: '10%', aggregates: ['sum']},
          { text: 'Cost', cellsAlign: 'center', align: 'center', dataField: 'Cost', width: '10%', aggregates: ['sum'] },
          { text: 'Price', cellsAlign: 'center', align: 'center', dataField: 'Price', width: '10%', aggregates: ['sum']},
          { text: 'MV', cellsAlign: 'center', align: 'center', dataField: 'MV', width: '10%'},
          { text: 'P&L Today', cellsAlign: 'center', align: 'center', dataField: 'PL_Today', width: '10%'},
          { text: 'MTD P&L', cellsAlign: 'center', align: 'center', dataField: 'MTD_PL', width: '10%', aggregates: ['sum']},
          { text: 'YTD P&L', cellsAlign: 'center', align: 'center', dataField: 'YTD_PL', width: '10%', aggregates: ['sum']},
          { text: 'P&L (since TD)', cellsAlign: 'center', align: 'center', dataField: 'PL', width: '10%'},
          { text: 'VAR', cellsAlign: 'center', align: 'center', dataField: 'VAR', width: '10%'}
        ]
        
    });  
    
    $(function() {
		$('#containerproduct1').highcharts(
				{
					chart : {
						type : 'bar'
					},
					title : {
						text : ''
					},
					xAxis : {
						categories : [ 'Bonds', 'CDS', 'CFD', 'Eq Options',
								'Futures', 'IRS' ]
					},
					credits : {
						enabled : false
					},
					series : [ {
						name : '',
						data : [ -4352714, -4217036, -394011, -34554, -37195,
								-193548 ]
					} ]
				});
	});
});


/**
 * Risk Time Horizon - Start
 */
$(document).ready(function () {
    
    // prepare the data
    var source =
    {
        dataType: "json",
        dataFields: [
				{ name: 'name', type: 'string' },
				{ name: 'tenor', type: 'string' },
				{ name: 'perturbation Type', type: 'string' },
				{ name: 'plBase', type: 'string' },
				{ name: 'delta', type: 'string' },
				{ name: 'deltaBase', type: 'string' },
				{ name: 'tradeId', type: 'string' },
				{ name: 'version', type: 'string' },
				{ name: 'productType', type: 'string' },
				{ name: 'description', type: 'string' },
				{ name: 'status', type: 'string' },
				{ name: 'currency', type: 'string' },
				{ name: 'underlierInfo', type: 'string' },
				{ name: 'underlierInfoType', type: 'string' },
				{ name: 'maturityDate', type: 'string' },
				{ name: 'riskMaturity', type: 'string' },
				{ name: 'unwindDate', type: 'string' },
				{ name: 'maturityDateYear', type: 'string' },
				{ name: 'currentNotional', type: 'string' },
				{ name: 'book', type: 'string' },
				{ name: 'horizonTime', type: 'string' },
				{ name: 'issuer', type: 'string' },
				{ name: 'folder', type: 'string' },
				{ name: 'party', type: 'string' },
				{ name: 'entityId', type: 'string' },
				{ name: 'parentEntityId', type: 'string' },
				{ name: 'entity', type: 'string' },
				{ name: 'parentEntity', type: 'string' },
				{ name: 'trader', type: 'string' },
				{ name: 'mXN', type: 'string' },
				{ name: 'uSD', type: 'string' },
				{ name: 'eUR', type: 'string' }

        ], 
        url:  ezopsContextPath+'/getReports/getrisktimehorizongrid'
    };
    var dataAdapter = new $.jqx.dataAdapter(source, {
        loadComplete: function () {
            // data is loaded.
        }
    });
    var cellClass = function (row, dataField, cellText, rowData) {
        var cellValue = rowData[dataField];
        switch (dataField) {
            case "diffQuantity":
                if (cellValue >100 || cellValue < 0) {
                    return "minavg";                            
                }
                if (cellValue <= 100 ) {
                    return "max";
                }                       
                return "max";
                
            case "diffMarketValue":
                if (cellValue >100 || cellValue < 0) {
                    return "minavg";                            
                }
                if (cellValue <= 100 ) {
                    return "max";
                }                        
                return "min";                    
        }
    };
    // create jqxDataTable.
    $("#riskTimeHorizonGrid").jqxGrid(
    {
        source: dataAdapter,
        altRows: true,
        width: '99%',
        height: '600',
        sortable: true,
        pageable:false,
        filterable: true,
        groupable: true,
        showstatusbar: true,
        statusbarheight: 50,
        showaggregates: true,
        columnsresize: true,
        columnsreorder: true,
        
        columns: [
				{text:'Name',dataField:'name',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Tenor',dataField:'tenor',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Perturbation Type',dataField:'perturbation Type',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Pl Base',dataField:'plBase',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Delta',dataField:'delta',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Delta Base',dataField:'deltaBase',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Trade Id',dataField:'tradeId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Version',dataField:'version',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Product Type',dataField:'productType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Description',dataField:'description',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Status',dataField:'status',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Currency',dataField:'currency',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Underlier Info',dataField:'underlierInfo',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Underlier Info Type',dataField:'underlierInfoType',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Maturity Date',dataField:'maturityDate',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Risk Maturity',dataField:'riskMaturity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Unwind Date',dataField:'unwindDate',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Maturity Date Year',dataField:'maturityDateYear',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Current Notional',dataField:'currentNotional',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Book',dataField:'book',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Horizon Time',dataField:'horizonTime',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Issuer',dataField:'issuer',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Folder',dataField:'folder',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Party',dataField:'party',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Entity Id',dataField:'entityId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Parent Entity Id',dataField:'parentEntityId',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Entity',dataField:'entity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Parent Entity',dataField:'parentEntity',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'Trader',dataField:'trader',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'MXN',dataField:'mXN',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'USD',dataField:'uSD',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'},
				{text:'EUR',dataField:'eUR',cellsAlign: 'center',columngroup: 'ProductDetails', align: 'center',  width: '100px'}
		]
        
    });  
    
    $(function() {
		$('#riskTimeHorizonChart').highcharts(
				{
					chart : {
						type : 'bar'
					},
					title : {
						text : ''
					},
					xAxis : {
						categories : [ 'Bonds', 'CDS', 'CFD', 'Eq Options',
								'Futures', 'IRS' ]
					},
					credits : {
						enabled : false
					},
					series : [ {
						name : '',
						data : [ -4352714, -4217036, -394011, -34554, -37195,
								-193548 ]
					} ]
				});
	});
});
/** Risk Time Horizon - Start **/